HTMLify
style.css
Views: 18 | Author: cody
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | @import url('https://rsms.me/inter/inter-ui.css'); body { align-items: center; background: linear-gradient(-45deg, #210242, #9198e5); display: flex; font-family: 'Inter UI', sans-serif; height: 100vh; justify-content: center; margin: 0; width: 100vw; } .card { background: white; border-radius: 12px; box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); height: 200px; overflow: hidden; padding: 20px; position: relative; width: 300px; } .title { font-size: 1.5em; height: 29px; margin-bottom: 0; } .text { color: #667; font-size: 1em; height: 38px; margin: 5px 0 0; } .line { left: 0; position: absolute; width: 340px; } .line path { fill: none; stroke: black; stroke-width: 2; stroke-dasharray: 300 1903; } .card.saving .line path { stroke-dashoffset: -472; stroke-dasharray: 153 1903; transition: stroke-dasharray 500ms, stroke-dashoffset 500ms; } .card.done .line path { stroke-dashoffset: -762; stroke-dasharray: 1095 1903; transition: stroke-dasharray 1500ms, stroke-dashoffset 1500ms; } .line2 { height: 52px; left: 150px; opacity: 0; position: absolute; stroke-dasharray: 6 48; stroke-dashoffset: -42; top: 158px; transform-origin: 50%; width: 50px; } .card.saving .line2 { animation: 4s 500ms Rotate forwards; } .card.done .line2 { animation: 500ms ScaleDown forwards; } .form { transform-origin: 0 50%; transition: transform 500ms, opacity 500ms; } .card.saving .form { transform: translateY(-16px) scale(.8); } .card.done .form { transform: translateY(-16px) scale(.8); opacity: 0; } .input { background: transparent; border: 0; box-sizing: border-box; font-size: 20px; height: 40px; margin-top: 20px; outline: none !important; position: relative; width: 300px; } @keyframes Rotate { 0% { transform: rotate(0); opacity: 1; } 25% { transform: rotate(360deg); opacity: 1; } 50% { transform: rotate(720deg); opacity: 1; } 75% { transform: rotate(1080deg); opacity: 1; stroke-dasharray: 6 48; stroke-dashoffset: -42;} 100% { transform: rotate(1080deg); opacity: 1; stroke-dashoffset: 0; stroke-dasharray: 36 48;} } @keyframes ScaleDown { 0% { transform: scale(1); } 100% { transform: scale(0);} } |